﻿using Core.UI;
using Core.UI.UISub;
using Cysharp.Threading.Tasks;
using UnityEngine.UI;

namespace Game.UI.Example
{
    public class WeaponInfoWindow : UIWindowBase
    {
        public Button toWeaponPanelBtn;
        public Button returnBtn;

        protected override void Awake()
        {
            base.Awake();
            
            toWeaponPanelBtn.onClick.AddListener(OnClickToWeaponPanel);    
            returnBtn.onClick.AddListener(OnClickReturn);
        }

        private void OnClickReturn()
        {
            this.HideSelf();
        }

        private void OnClickToWeaponPanel()
        {
            UIManager.Ins.ShowUI(UIPanelName.WeaponPanel).Forget();
        }
    }
}